package Structural.Flyweight.unsharable;

//具体享元（Concrete Flyweight）角色：实现抽象享元角色中所规定的接口。
//具体享元角色
public class ConcreteFlyweight implements Flyweight
{
    private String key;
    public ConcreteFlyweight(String key)
    {
        this.key=key;
        System.out.println("具体享元"+key+"被创建！");
    }
    @Override
    public void operation(UnsharedConcreteFlyweight outState)
    {
        System.out.print("具体享元"+key+"被调用，");
        System.out.println("非享元信息是:"+outState.getInfo());
    }
}
